package day20171231;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by 星月 on 2017/12/31.
 */
public class CountFiles {
public static void main(String[] args) throws ClassNotFoundException {
    String file_path = "F:\\作业\\16信本2班Java作业一";
        File file = new File(file_path);
        if(!file.exists()){
            System.out.println("路径不存在");
        }else{
            File[] files = file.listFiles();
            int i = files.length;
            System.out.println("包含文件个数="+i);

        }
    }

}
